package com.littlebee.storysuper.entry;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by xuhuixiang on 2017/9/11.
 */

public class Playinfo implements Parcelable {
    private int pageno;
    private long startsecond;
    private long endsecond;

    public Playinfo() {
    }

    public Playinfo(int pageno, long startsecond, long endsecond) {
        this.pageno = pageno;
        this.startsecond = startsecond;
        this.endsecond = endsecond;
    }

    protected Playinfo(Parcel in) {
        pageno = in.readInt();
        startsecond = in.readLong();
        endsecond = in.readLong();
    }

    public static final Creator<Playinfo> CREATOR = new Creator<Playinfo>() {
        @Override
        public Playinfo createFromParcel(Parcel in) {
            return new Playinfo(in);
        }

        @Override
        public Playinfo[] newArray(int size) {
            return new Playinfo[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(pageno);
        dest.writeLong(startsecond);
        dest.writeLong(endsecond);
    }

    public int getPageno() {
        return pageno;
    }

    public void setPageno(int pageno) {
        this.pageno = pageno;
    }

    public long getStartsecond() {
        return startsecond;
    }

    public void setStartsecond(long startsecond) {
        this.startsecond = startsecond;
    }

    public long getEndsecond() {
        return endsecond;
    }

    public void setEndsecond(long endsecond) {
        this.endsecond = endsecond;
    }

    public static Creator<Playinfo> getCREATOR() {
        return CREATOR;
    }
}
